Hey all,
Currently trying to troubleshoot a script/issue that I'm encountering. Here is the scenario.
Using a PowerShell script, I'm creating a WTG stick and using Expand-WindowsImage to lay down an OS image to a volume. After this, I am executing BCDBoot to lay down the BCD store. This is all wrapped in a advanced function.
The issue is that after the image is done being applied, my command...
Start-Process -FilePath "${OSDriveLetter}:\Windows\System32\bcdboot.exe" -WorkingDirectory "${OSDriveLetter}:\Windows\System32" -ArgumentList "${OSDriveLetter}:\Windows /f ALL /s ${SystemDriveLetter}:"
does not apply the BCD Store. I used the RedirectStandardOutput property to determine what the output of the command is and it returns the "failure when initializing library system volume". Here is the thing...if I suspend the script right after this and then execute the very same line again (variables and all) it lays down the store as expected.
So how would one troubleshoot this? Ideas?